package algorithm.sort;

public class MaoPao {

  public static void main(String[] args) {

    //
    int[] arrK = {132, 1};

    for (int j = 0; j < arrK.length; j++) {

      int max = arrK[0];
      int maxindex = 0;
      for (int k = 0; k < arrK.length - j; k++) {

        if (max < arrK[k]) {
          //
          max = arrK[k];
          //
          maxindex = k;
        }
      }
      //
      int temp = arrK[maxindex];
      arrK[maxindex] = arrK[arrK.length - 1 - j];
      arrK[arrK.length - 1 - j] = temp;
    }

    for (int lll : arrK) {
      System.out.println(lll);
    }


  }

}
